﻿using SqlSugar;
using System.Collections.Generic;

namespace LPLS.DBEntities
{
    // SQLSugar上下文类
    // SQLSugar上下文类
    public class DBContext
    {
        private readonly Dictionary<string, SqlSugarClient> _dbContexts;

        public DBContext(Dictionary<string, SqlSugarClient> dbContexts)
        {
            _dbContexts = dbContexts;
        }

        public SqlSugarClient GetDbContext(string dbKey)
        {
            // 根据数据库键获取对应的SqlSugarClient实例
            return _dbContexts[dbKey];
        }
    }
}